<template>
	<view :style="themeColor">
		<view class="page">
			<view class="flex flex-wrap align-center justify-between benben-position-layout flex ranking_flex_0"
				:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
				<view class='flex flex-wrap align-center ranking_fd0_0' @tap.stop="handleJumpDiy" data-type="back"
					data-url="1">
					<text class='fu-iconfont2  ranking_fd0_0_c0'>&#xe794;</text>
				</view>
				<view class='flex flex-wrap align-center ranking_fd0_1'>
				</view>

			</view>
			<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
			<!---flex布局flex布局开始-->
			<view class="flex benben-flex-layout flex-wrap align-center ranking_flex_1">
				<image class='ranking_fd1_0' mode="aspectFit" :src='STATIC_URL+"27.png"'></image>
			</view>

			<!---flex布局flex布局结束-->
			<!---flex布局flex布局开始-->
			<view class="flex flex-direction flex-wrap align-stretch benben-flex-layout ranking_flex_2">
				<template v-for='(item,key0) in rankingList'>
					<view class='flex flex-wrap align-center ranking_fd2_0' :key='key0'>
						<image class='ranking_fd2_0_c0' mode="aspectFill" :src='item.avatar'></image>
						<view class='flex flex-direction flex-wrap align-stretch flex-sub ranking_fd2_0_c1'>
							<text class='flex-sub ranking_fd2_0_c1_c0'>{{item.real_name}}</text>
							<view class='flex flex-wrap align-center flex-sub'>
								<image class='ranking_fd2_0_c1_c1_c0' mode="aspectFit" :src='STATIC_URL+"28.png"'>
								</image>
								<text class='ranking_fd2_0_c1_c1_c1'>{{item.order_count}}</text>
							</view>
						</view>
						<text class='ranking_fd2_0_c2'>NO.</text>
						<text class='ranking_fd2_0_c2'>{{key0+1}}</text>
					</view>
				</template>

			</view>

			<!---flex布局flex布局结束-->
			<!---flex布局flex布局开始-->
			<view class="flex benben-flex-layout flex-wrap align-center ranking_flex_3" v-if=" rankingList.length<'1'">
				<benben-empty>
					<view class='flex flex-direction flex-wrap align-center ranking_fd3_0'>
						<image class='ranking_fd3_0_c0' mode="widthFix" :src='STATIC_URL+"119.png"'></image>

					</view>
				</benben-empty>
			</view>

			<!---flex布局flex布局结束-->


		</view>
	</view>
</template>
<script>
	import {
		validate
	} from '@/common/utils/validate.js'

	export default {
		components: {},


		data() {
			return {
				"rankingList": [],
				"shopID": uni.getStorageSync('shopID') || ''
			};
		},
		computed: {
			themeColor() {
				return this.$store.getters.themeColor
			},

		},
		watch: {},
		onLoad(options) {
			this.getRankingFunc()
		},
		onUnload() {

		},
		onReady() {

		},
		onShow() {
			this.shopID = uni.getStorageSync('shopID') || ''
		},
		onHide() {

		},
		onResize() {

		},
		onPullDownRefresh() {

		},
		onReachBottom(e) {

		},
		onPageScroll(e) {

		},
		methods: {
			//获取排行榜信息
			async getRankingFunc() {
				//请求方法
				//数据验证

				let datarankingList = await this.$api.get(global.apiUrls.post63f6b4448712d, {
					usermerchant_id: this.shopID
				});

				if (datarankingList.data.code != 1) {
					this.$message.info(datarankingList.data.msg);
					return
				}
				let inforankingList = datarankingList.data;
				this.rankingList = inforankingList.data

			}
		}
	};
</script>
<style lang="scss" scoped>
	.page {
		width: 100vw;
		overflow-x: hidden;
		min-height: calc(100vh - var(--window-bottom));
		background: url(image-path('13.png')) no-repeat, #fff;
		background-size: 100% auto;
	}

	.ranking_flex_0 {
		background: url(image-path('13.png')) no-repeat, transparent;
		width: 750rpx;
		height: 88rpx;
		overflow: hidden;
		z-index: 10;
		top: 0rpx;
		background-size: 100% auto !important;
	}

	.ranking_fd0_1 {
		margin: 0rpx 32rpx 0rpx 0rpx;
		width: 120rpx;
		height: 88rpx;
	}

	.ranking_fd0_0_c0 {
		font-size: 36rpx;
		color: #fff;
	}

	.ranking_fd0_0 {
		margin: 0rpx 0rpx 0rpx 32rpx;
		width: 120rpx;
		height: 88rpx;
	}

	.ranking_flex_1 {
		margin: 37rpx 0rpx 0rpx 0rpx;
		padding: 0rpx 0rpx 0rpx 24rpx;
	}

	.ranking_fd1_0 {
		width: 236rpx;
		height: 72rpx;
	}

	.ranking_flex_2 {
		background: #fff;
		background-size: 100% auto !important;
		margin: 94rpx 32rpx 0rpx 32rpx;
		border-radius: 16rpx 16rpx 0rpx 0rpx;
		box-shadow: 0rpx 8rpx 12rpx rgba(70, 67, 67, 0.08);
		padding: 0rpx 32rpx 0rpx 32rpx;
	}

	.ranking_fd2_0_c2 {
		color: #000000;
		font-size: 28rpx;
		font-weight: 500;
		line-height: 40rpx;
	}

	.ranking_fd2_0_c1_c1_c1 {
		-webkit-line-clamp: 1;
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		color: #999999;
		font-size: 24rpx;
		font-weight: 400;
		line-height: 33rpx;
	}

	.ranking_fd2_0_c1_c1_c0 {
		width: 24rpx;
		height: 24rpx;
		margin: 0rpx 16rpx 0rpx 0rpx;
	}

	.ranking_fd2_0_c1_c0 {
		-webkit-line-clamp: 1;
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		color: #333333;
		font-size: 32rpx;
		font-weight: 500;
		line-height: 45rpx;
		margin: 0rpx 0rpx 16rpx 0rpx;
	}

	.ranking_fd2_0_c1 {
		margin: 0rpx 24rpx 0rpx 0rpx;
	}

	.ranking_fd2_0_c0 {
		width: 80rpx;
		height: 80rpx;
		border-radius: 40rpx 40rpx 40rpx 40rpx;
		margin: 0rpx 24rpx 0rpx 0rpx;
	}

	.ranking_fd2_0 {
		border-bottom: 1px solid #eee;
		padding: 32rpx 0rpx 32rpx 0rpx;
	}

	.ranking_flex_3 {
		margin: 94rpx 0rpx 0rpx 0rpx;
	}

	.ranking_fd3_0_c0 {
		width: 400rpx;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
	}

	.ranking_fd3_0 {
		width: 100%;
		padding: 50rpx 0rpx 50rpx 0rpx;
	}
</style>